package com.leeon.container;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class AsListDemo {

    public static void main(String[] args){

        Collection<Integer> collection = new ArrayList<Integer>(Arrays.asList(1,2,3,4,9));

/*        for (Integer i : collection) {
            System.out.println("Integer i = " + i);
        }*/

        Integer[] a = {1,2,3,4,5,0};


/*        collection.addAll(Arrays.asList(a));

        for (Integer i : collection) {
            System.out.println("Integer i = " + i);
        }*/

        List<Integer> list = Arrays.asList(a);

        list.set(0,55);
        list.add(77);
    }

}
